import React from 'react';
import { Button, Tooltip } from 'antd';
import Icon from '../Icon';

const ActionButtons = function ActionButtons({
  onActions,
  isFullScreen = false,
  canRedo = false,
  canUndo = false
}) {
  const _globalAssets = window._globalAssets,
        innerSystem = _globalAssets.innerSystem,
        outerSystem = _globalAssets.outerSystem;
  return /*#__PURE__*/React.createElement("div", {
    className: "ra-arch-actionWrapper"
  }, /*#__PURE__*/React.createElement("div", {
    className: "ra-arch-actionButtons"
  }, /*#__PURE__*/React.createElement("div", {
    className: "ra-arch-btns-group"
  }, /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u64A4\u9500"
  }, /*#__PURE__*/React.createElement(Button, {
    disabled: !canUndo,
    onClick: () => onActions('undo')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-undo"
  }))), /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u91CD\u505A"
  }, /*#__PURE__*/React.createElement(Button, {
    disabled: !canRedo,
    onClick: () => onActions('redo')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-redo"
  })))), /*#__PURE__*/React.createElement("div", {
    className: "ra-arch-btns-group"
  }, /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u7F29\u5C0F"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('smaller')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-smaller"
  }))), /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u653E\u5927"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('bigger')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-bigger"
  }))), isFullScreen ? /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u8FD8\u539F"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('normal')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-small"
  }))) : /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u5168\u5C4F"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('full')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-full"
  })))), /*#__PURE__*/React.createElement("div", {
    className: "ra-arch-btns-group"
  }, /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u672C\u5730\u5BFC\u5165\u6570\u636E"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('importData')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-import-data"
  }))), /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u672C\u5730\u5BFC\u51FA\u6570\u636E"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('exportData')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-export-data"
  }))), /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u672C\u5730\u5BFC\u51FA\u56FE\u7247"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('exportImg')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-export-img"
  }))), /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u4E0A\u4F20\u6570\u636E"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('save')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-save-clound"
  }))), /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u590D\u5236\u8282\u70B9"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('copy')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-copy"
  }))), /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u7C98\u8D34\u8282\u70B9"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('paste')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-paste"
  }))), /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u5220\u9664\u8282\u70B9"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('delete')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-delete"
  }))), /*#__PURE__*/React.createElement(Tooltip, {
    title: "\u6E05\u7406\u7F13\u5B58"
  }, /*#__PURE__*/React.createElement(Button, {
    onClick: () => onActions('clearStorage')
  }, /*#__PURE__*/React.createElement(Icon, {
    type: "icon-clear-storage"
  }))))), /*#__PURE__*/React.createElement("div", {
    className: "ra-arch-systemDesc"
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("img", {
    src: innerSystem
  }), "\u5185\u90E8\u7CFB\u7EDF"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("img", {
    src: outerSystem
  }), "\u5916\u90E8\u7CFB\u7EDF")));
};

export default ActionButtons;